{% extends "../main.html" %}

{% block head %}
{% endblock %}

{% block breadcrumb %}
<nav>
    <ul id="crumbs">
        <li><a href="/">{{ system_title }}</a></li>
        <li><a href="/reception">{{ str.reception }}</a></li>
        <li>{{ reception.name.translate|striptags }} ({{ reception.start_datetime|date:"d.m.Y" }} - {{ reception.end_datetime|date:"d.m.Y" }})</li>
    </ul>
</nav>
{% endblock %}

{% block content %}

<div id="content">
    {% regroup leechers|dictsort:"grade_displayname" by grade_displayname as gradegroup %}
    {% for grade in gradegroup %}
    <h2>{{ grade.grouper }}<span>{{ grade.list|length }}</span></h2>
    <div class="table" style="margin-bottom:10px;">
        {% for p in grade.list|dictsort:"displayname" %}
        <div class="table_row" alt="{{ p.key }}"{% if p.is_new %} style="font-weight:bold;"{% endif %}>
            <div class="table_cell" style="padding:5px 0px 0px 0px;">
                {% if p.is_new %}<img src="/images/unread.png" width="16" height="16" title="access:{{ p.access|date:"d.m.Y H:i:s" }} - change:{{ p.changed|date:"d.m.Y H:i:s" }}">{% endif %}
            </div>
            {% if p.photo %}
            <img class="table_cell" src="{{ p.photo.url }}/24/c" style="width:24px; height:24px;">
            {% else %}
            <div class="table_cell" style="width:24px; height:24px;"></div>
            {% endif %}
            <a class="table_cell" style="width:360px" href="/reception/application/{{ p.key }}">
                {{ p.displayname|default:"" }}
            </a>
            <div class="table_cell" style="width:200px">
                {{ p.primary_email }}
            </div>
            <div class="table_cell" style="width:100px">
                {{ p.idcode|default:"" }}
            </div>
            <div class="table_cell" style="width:100px; text-align:center;">
                {{ p.birth_date|date:"d.m.Y" }}
            </div>
            <div class="table_cell" style="width:20px; text-align:center;">
                {{ p.have_been_subsidised|yesno:"€, , " }}
            </div>
        </div>
        {% endfor %}
    </div>
    {% endfor %}
    <a href="/rating/lock/{{ reception.key.id }}" class="button" style="float:right;">{{ str.rating_lock }}</a>
</div>
{% endblock %}